import request from '@/utils/request'

export function getDiaryData(diary_group_id) {
  return request({
    url: `/diary-group/${diary_group_id}`,
    method: 'get'
  })
}

export function getDiaryList(diary_group_id) {
  return request({
    url: `/diary?diary_group_id=${diary_group_id}`,
    method: 'get'
  })
}

export function getRecommendDiary(diary_group_id, per_page = 3) {
  return request({
    url: '/diary-group/recomm',
    method: 'get',
    params: {
      diary_group_id,
      per_page
    }
  })
}
